using System.Collections.Generic;
using System.Xml.Serialization;
using NHibernate.Validator.Constraints;
using SharpArch.Core.DomainModel;


namespace good1.Core
{
    public class Location : Entity
    {
        public Location()
        {
            if(country==null) country = new Country();
            if(latLng==null) latLng = new LatLng();
        }
        private Country country;
        private LatLng latLng;

        [NotNull, NotEmpty]
        [Length(50)]
		public virtual string Place { get; set; }
        
        public virtual Country Country { get { return country; } set { country = value; } }
        //ALTER TABLE Location ADD CountryFk INT

        [XmlIgnore]
        public virtual IList<Country> Countries { get; set; }

        public virtual LatLng LatLng { get { return latLng; } set { latLng = value; } }

        public virtual string Name { get { return Place; } }
        public virtual string Image { get; set; }
       

    }
}
